<?php
class AddResolutionForm extends Zend_Form
{
	public function init()
	{
		$pname = $this->createElement('text','pname');
		$pname->setLabel('* Name:')
				->setRequired(true)
				->setAttrib('style','width:35%');
		
		$description = $this->createElement('text','description');
		$description->setLabel('Description:')
					->setAttrib('style','width:60%');
					
		$add = $this->createElement('submit','add');
		$add->setLabel('Add')
				->setDecorators(array(
							'viewHelper',
								'Errors',
								array('Description', array('tag'=>'', 'escape'=>false)),
								array(array('data'=>'HtmlTag'),
									array('tag'=>'td', 'valign'=>'top', 'style'=> 'background-color:#ffffff;text-align:center;','colspan'=>2,'align'=>'center')),
								//array('Label', array('tag'=>'td')),
								array(array('row'=>'HtmlTag'), array('tag'=>'tr'))
				));
				
		$this->addElements(array(
						$pname,
						$description,
						$add
		));
		
		$this->setElementDecorators(array(
								'viewHelper',
								'Errors',
								array('Description', array('tag'=>'', 'escape'=>false)),
								array(array('data'=>'HtmlTag'),
									array('tag'=>'td', 'valign'=>'top', 'style'=> 'background-color:#ffffff;text-align:left','width'=>'70%','')),
								array('Label', array('tag'=>'td')),
								array(array('row'=>'HtmlTag'), array('tag'=>'tr'))),
								array('pname', 'description','icon_url','status_color')
								);
								
		$this->addDecorators(array(
				'FormElements',
				array('HtmlTag', array('tag' => 'table','cellspacing'=>'0','border'=>'0','class'=>'pform','width'=>'100%')),
				'Form'
		));
			
	}
}
